/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package model.integration;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;
import model.dto.CompetenceDTO;

/**
 *
 * @author Ahmed Salem
 */
@Entity
@Table(name = "competence", catalog = "greenland", schema = "")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Competence.findAll", query = "SELECT c FROM Competence c"),
    @NamedQuery(name = "Competence.findByCompetenceId", query = "SELECT c FROM Competence c WHERE c.competenceId = :competenceId"),
    @NamedQuery(name = "Competence.findByName", query = "SELECT c FROM Competence c WHERE c.name = :name")})
public class Competence implements Serializable,CompetenceDTO {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "competence_id")
    private Integer competenceId;
    @Size(max = 45)
    @Column(name = "name")
    private String name;

    /**
     *
     */
    public Competence() {
    }

    /**
     *
     * @param competenceId
     * @param name
     */
    public Competence(Integer competenceId, String name) {
        this.competenceId = competenceId;
        this.name = name;
    }

    /**** All the set methods of the Competence class *****
     * @param competenceId 
     */ 
    public void setCompetenceId(Integer competenceId) {
        this.competenceId = competenceId;
    }
    
    /**
     *
     * @param name
     */
    public void setName(String name) {
        this.name = name;
    }/*** The end of the set methods *******/

    /**** All the get methods of the Competence class *****
     * @return 
     */ 
    @Override
    public String getName() {
        return name;
    }
    
    /**
     *
     * @return
     */
    @Override
     public Integer getCompetenceId() {
        return competenceId;
    }/*** The end of the get methods *******/


   

}
